/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AddressPanel.java
 *
 * Created on 2011-8-21, 16:23:52
 */
package com.securitytrace.client;

import java.awt.event.ActionListener;

/**
 *
 * @author Administrator
 */
public class AddressPanel extends javax.swing.JPanel {

	private static final long serialVersionUID = 2083651625147130523L;
	/** Creates new form AddressPanel */
    public AddressPanel() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

		new javax.swing.JSeparator();
        new javax.swing.JLabel();
        new javax.swing.JScrollPane();
        new javax.swing.JTree();
        new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        addressNameTextField = new javax.swing.JTextField();
        searchAddressButton = new javax.swing.JButton();
        addAddressButton = new javax.swing.JButton();
        updateAddressButton = new javax.swing.JButton();
        deleteAddressButton = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        addressTable = new javax.swing.JTable();
        addressHomePageButton = new javax.swing.JButton();
        addressPreviousPageButton = new javax.swing.JButton();
        addressLastPageButton = new javax.swing.JButton();
        addressNextPageButton = new javax.swing.JButton();
        addressPageInfoLabel = new javax.swing.JLabel();
	
         jLabel1.setText("地点名称：");
        searchAddressButton.setText("搜索");
        addAddressButton.setText("新增");
        updateAddressButton.setText("修改");
        deleteAddressButton.setText("删除");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(38, 38, 38)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(addressNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(searchAddressButton)
                .addGap(43, 43, 43)
                .addComponent(addAddressButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(updateAddressButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(deleteAddressButton)
                .addContainerGap(59, Short.MAX_VALUE))
        );

        jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {addAddressButton, deleteAddressButton, updateAddressButton});

        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE, false)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(addressNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(searchAddressButton)
                .addComponent(addAddressButton)
                .addComponent(updateAddressButton)
                .addComponent(deleteAddressButton))
        );

        jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {addAddressButton, addressNameTextField, deleteAddressButton, jLabel1, searchAddressButton, updateAddressButton});

        jScrollPane2.setViewportView(addressTable);
        /*addressTable.getColumnModel().getColumn(0).setMinWidth(130);
        addressTable.getColumnModel().getColumn(0).setMaxWidth(15);
        addressTable.getColumnModel().getColumn(1).setResizable(false);*/

        addressHomePageButton.setText("首  页");
        addressPreviousPageButton.setText("上一页");
        addressNextPageButton.setText("下一页");
        addressLastPageButton.setText("末  页");

        javax.swing.GroupLayout addressPanelLayout = new javax.swing.GroupLayout(this);
        this.setLayout(addressPanelLayout);
        addressPanelLayout.setHorizontalGroup(
            addressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addressPanelLayout.createSequentialGroup()
                .addContainerGap(97, Short.MAX_VALUE)
                .addComponent(addressHomePageButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(addressPreviousPageButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(addressNextPageButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(addressLastPageButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(addressPageInfoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(72, 72, 72))
            .addGroup(addressPanelLayout.createSequentialGroup()
                .addGap(29, 29, 29)
                .addGroup(addressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 565, Short.MAX_VALUE))
                .addContainerGap(29, Short.MAX_VALUE))
        );
        addressPanelLayout.setVerticalGroup(
            addressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(addressPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 447, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(addressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(addressHomePageButton)
                    .addComponent(addressPreviousPageButton)
                    .addComponent(addressNextPageButton)
                    .addComponent(addressLastPageButton)
                    .addComponent(addressPageInfoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
	
	protected javax.swing.JButton addAddressButton;
	protected javax.swing.JButton addressHomePageButton;
	protected javax.swing.JButton addressLastPageButton;
	protected javax.swing.JTextField addressNameTextField;
	protected javax.swing.JButton addressNextPageButton;
	protected javax.swing.JLabel addressPageInfoLabel;
	protected javax.swing.JButton addressPreviousPageButton;
	protected javax.swing.JTable addressTable;
	protected javax.swing.JButton deleteAddressButton;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane2;
    protected javax.swing.JButton searchAddressButton;
    protected javax.swing.JButton updateAddressButton;
    /***以下为get/set方法**/
	public javax.swing.JTextField getAddressNameTextField() {
		return addressNameTextField;
	}
	public void setAddressNameTextField(javax.swing.JTextField addressNameTextField) {
		this.addressNameTextField = addressNameTextField;
	}
	public javax.swing.JLabel getAddressPageInfoLabel() {
		return addressPageInfoLabel;
	}
	public void setAddressPageInfoLabel(javax.swing.JLabel addressPageInfoLabel) {
		this.addressPageInfoLabel = addressPageInfoLabel;
	}
	public javax.swing.JTable getAddressTable() {
		return addressTable;
	}
	public void setAddressTable(javax.swing.JTable addressTable) {
		this.addressTable = addressTable;
	}
	public void setAddAddressButton(ActionListener listener) {
		this.addAddressButton.addActionListener(listener);
	}
	public void setAddressHomePageButton(ActionListener listener) {
		this.addressHomePageButton.addActionListener(listener);
	}
	public void setAddressLastPageButton(ActionListener listener) {
		this.addressLastPageButton.addActionListener(listener);
	}
	public void setAddressNextPageButton(ActionListener listener) {
		this.addressNextPageButton.addActionListener(listener);
	}
	public void setAddressPreviousPageButton(ActionListener listener) {
		this.addressPreviousPageButton.addActionListener(listener);
	}
	public void setDeleteAddressButton(ActionListener listener) {
		this.deleteAddressButton.addActionListener(listener);
	}
	public void setSearchAddressButton(ActionListener listener) {
		this.searchAddressButton.addActionListener(listener);
	}
	public void setUpdateAddressButton(ActionListener listener) {
		this.updateAddressButton.addActionListener(listener);
	}
}
